﻿(function($){
	$.util.namespace("func");
	
	var projectInfo = "#projectInfo", weatherChart = "#weatherChart", toDaySchedule = "#toDaySchedule",
		systemNotice = "#systemNotice" ;
	
	window.func.person = function() {
		alert("个人资料！") ;
	};
	window.func.pic = function() {
		alert("设置头像！") ;
	};
	window.func.sendMail = function() {
		alert("发送邮件！") ;
	};
	
	window.func.im = function() {
		alert("发送即时消息！") ;
	};
	
	window.func.projectInfo = function() {
		alertify.warning("开发中，敬请期待...");
	};
	
	window.func.weatherChart = function() {

		var c = $(weatherChart).highcharts({
	        chart: {
	            type: 'column'
	        },
	        title: {
	            text: '总的水果消费，按性别分组'
	        },
	        xAxis: {
	            categories: ['苹果', '橙子', '榴莲', '椰子', '香蕉']
	        },
	        yAxis: {
	            allowDecimals: false, 
	            min: 0,
	            title: {
	                text: '数目'
	            }
	        },
	        tooltip: {
	            formatter: function() {
	                return '<b>'+ this.x +'</b><br>'+
	                    this.series.name +': '+ this.y +'<br>'+
	                    '总数量: '+ this.point.stackTotal;
	            }
	        },
	        plotOptions: {
	            column: {
	                stacking: 'normal'
	            }
	        },
	        series: [{
	            name: '努尔哈赤',
	            data: [5, 3, 4, 7, 2],
	            stack: 'male'
	        }, {
	            name: '成吉思汗',
	            data: [3, 4, 4, 2, 5],
	            stack: 'male'
	        }, {
	            name: '杨贵妃',
	            data: [2, 5, 6, 2, 1],
	            stack: 'female'
	        }, {
	            name: '武则天',
	            data: [3, 0, 4, 4, 3],
	            stack: 'female'
	        }]
	    }).highcharts();
		
		$("#weatherChartPanel").panel({
			onResize: function(width, height) {
				$(weatherChart).css("width", (width-10)+"px").css("height", (height-50)+"px");
				c.setSize(width-10,height-30);
			}
		}) ;
	};
	
	window.func.toDaySchedule = function() {
		alertify.warning("开发中，敬请期待...");
	};
	
	window.func.systemNotice = function() {
		alertify.warning("开发中，敬请期待...");
	};
	
})(jQuery);



